package com.laoxiang.execption;

import com.laoxiang.utils.AppHttpCodeEnum;
import lombok.*;

/**
 * @author db
 * @version 1.0
 * @description LxAdminException  自定义异常
 * @since 2023/7/23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LxAdminException extends RuntimeException{
    private int code;
    private String msg;

    public LxAdminException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }
}
